﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfTravelBags.aspx.cs" Inherits="msBsc.WebUi.wMall.Buyer.wfTravelBags" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>旅行车</title>
    <link href="/jqPlugin/SelectSimu/css/base.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Public/sTravel.css" rel="stylesheet" />
    <link href="/jqPlugin/layer2/skin/layer.css" rel="stylesheet" />
    <style type="text/css">
        .v_title {
            border-bottom: none !important;
        }

            .v_title .condition_title {
                width: 152px !important;
            }

                .v_title .condition_title .vt_name {
                    margin-right: 0px !important;
                }

            .v_title .condition_hr {
                width: 1048px;
                float: left;
                height: 2px;
                background: #808080;
                margin-top: 58px;
            }

        .tb_list {
            width: 1200px;
            display: table;
        }

            .tb_list .tbl_info {
                width: 1200px;
                margin-bottom: 10px;
                display: table;
            }

                .tb_list .tbl_info .tbl_check {
                    width: 52px;
                    float: left;
                    margin: auto;
                    text-align: center;
                    vertical-align: middle;
                    line-height: 178px;
                }

                .tb_list .tbl_info .tbl_img {
                    width: 313px;
                    float: left;
                    overflow: hidden;
                    text-align: left;
                    vertical-align: middle;
                }

                    .tb_list .tbl_info .tbl_img img {
                        width: 288px;
                        height: 178px;
                    }

                .tb_list .tbl_info .tbl_txt {
                    width: 745px;
                    height: 178px;
                    float: left;
                    display: block;
                }

                    .tb_list .tbl_info .tbl_txt .tblt_name {
                        font-size: 32px;
                        color: #95cc11;
                        font-family: 微软雅黑;
                        margin-top: 10px;
                    }

                    .tb_list .tbl_info .tbl_txt .tblt_info {
                        font-size: 14px;
                        color: #999999;
                        font-family: 微软雅黑;
                        text-indent: 29px;
                    }

                .tb_list .tbl_info .tbl_close {
                    width: 90px;
                    float: left;
                    line-height: 178px;
                    text-align: center;
                }

                    .tb_list .tbl_info .tbl_close .btnClose {
                        cursor: pointer;
                        width: 20px;
                        height: 20px;
                        background: url("/themes/wStyle1/Images/Public/btnClose.png") no-repeat;
                        background-size: 20px 20px;
                        display: block;
                        margin: auto;
                        margin-top: 79px;
                    }

        .viewContent .v_title .vt_vehiclesimg, .viewContent .v_title .vt_gallerysimg {
            width: 26px;
            height: 26px;
            background-size: 26px 26px;
        }

        .btnSub {
            width: 197px;
            height: 46px;
            background: #ff9e00;
            border: none;
            -moz-border-radius: 3px;
            -webkit-border-radius: 3px;
            border-radius: 3px;
            color: #fff;
            font-family: 微软雅黑;
            text-align: center;
            line-height: 46px;
            font-size: 24px;
            margin-left: 52px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="head">
        <div class="h_content">
            <div class="hc_login">
                <img src="/themes/wStyle1/Images/comm/log.png" />
            </div>
            <ul class="hc_menu">
                <li class="hcm_check">首页</li>
                <li>热门城市</li>
                <li>美食资讯</li>
                <li>包车资讯</li>
                <li>购物资讯</li>
                <li>司机资讯</li>
                <li>提交需求</li>
            </ul>
            <ul class="hc_rmenu">
                <li><a class="hcr_reg">登录</a></li>
                <li class="hc_hr">|</li>
                <li><a class="hcr_reg">注册</a></li>
            </ul>
        </div>
    </div>
    <div class="viewContent">
        <div class="v_title" style="display: none">
            <div class="condition_title">
                <span class="vt_locsimg"></span>
                <span class="vt_name">路线</span>
            </div>
            <div class="condition_hr"></div>
        </div>
        <div class="tb_list" id="route_list">
        </div>
        <xmp id="route_list_temp" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
            <div class="tbl_info">
                <div class="tbl_check">
                    <input type="checkbox" checked="checked" value="{{d.rows[i].ROUTE_BASEINFO_ID}}" />
                </div>
                <div class="tbl_img">
                    <img src="{{d.rows[i].ROUTE_DEFAULT_PIC}}  288x178img.jpg" />
                </div>
                <div class="tbl_txt">
                    <div class="tblt_name">{{d.rows[i].ROUTE_BASEINFO_NME}}</div>
                    <p class="tblt_info">{{d.rows[i].ROUTE_BASEINFO_INTRO}}</p>
                </div>
            </div>
              {{#} }}
           </xmp>

        <div class="v_title" style="display: none">
            <div class="condition_title">
                <span class="vt_gallerysimg"></span>
                <span class="vt_name">景点</span>
            </div>
            <div class="condition_hr"></div>
        </div>
        <div class="tb_list" id="jd_list">
        </div>
        <xmp id="jd_list_temp" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
            <div class="tbl_info" id="r_{{d.rows[i].ROUTE_DETAIL_ID}}">
                <div class="tbl_check">
                    <input type="checkbox" checked="checked" value="{{d.rows[i].ROUTE_DETAIL_ID}}" />
                </div>
                <div class="tbl_img">
                    <img title="{{d.rows[i].DETAIL_INFO_NME}}" src="{{d.rows[i].DETAIL_INFO_PIC}}  288x178img.jpg" />
                </div>
                <div class="tbl_txt">
                    <div class="tblt_name">{{d.rows[i].DETAIL_INFO_NME}}</div>
                    <p class="tblt_info">{{doBoundContent(d.rows[i].DETAIL_INFO_INTRO)}}</p>
                </div>
                <div class="tbl_close" onclick="deleteJd('{{d.rows[i].ROUTE_DETAIL_ID}}')">
                    <span class="btnClose"></span>
                </div>
            </div>
            {{#} }}
           </xmp>


        <div class="v_title">
            <div class="condition_title">
                <span class="vt_vehiclesimg"></span>
                <span class="vt_name">车辆</span>
            </div>
            <div class="condition_hr"></div>
        </div>
        <div class="tb_list" id="car_list">
        </div>
        <xmp id="car_list_temp" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
            <div class="tbl_info">
                <div class="tbl_check">
                    <input type="checkbox" checked="checked" value="{{d.rows[i].VEHICLE_INFO_ID}}" />
                </div>
                <div class="tbl_img">
                    <img src="{{d.rows[i].VEHICLE_DEFAULT_PIC}}  288x178img.jpg" />
                </div>
                <div class="tbl_txt">
                    <div class="tblt_name">{{d.rows[i].VEHICLE_NAME}}</div>
                    <p class="tblt_info">{{d.rows[i].VEHICLE_INTRO}}</p>
                </div>
            </div>
            {{#} }}
           </xmp>
        <div class="div_sub">
            <input type="button" class="btnSub" onclick="sublit()" value="需求提交" />
        </div>
    </div>
    <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    <!--start JS引用-->
    <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script src="/jqPlugin/js/jBase.js"></script>
    <script src="/jqPlugin/js/jBPage.js"></script>
    <script src="/jqPlugin/js/laytpl.js"></script>
    <script src="/themes/wStyle1/js/travellingBag.js"></script>
    <script src="/jqPlugin/layer2/layer.js"></script>

    <script charset="utf-8" src="/jqPlugin/kindeditor/kindeditor.js"></script>
    <script charset="utf-8" src="/jqPlugin/kindeditor/lang/zh_CN.js"></script>
    <!--end JS引用-->
    <script type="text/javascript">
        function doBoundContent(_shopurl) {
            _shopurl = "/" + _shopurl;
            if (_shopurl != null && _shopurl != undefined && _shopurl != '') {
                jQuery.loadHtml(_shopurl).done(function (_rethtml) {
                    var tpl = HtmlUtil.htmlDecode(_rethtml);
                    return tpl;
                    //scontenthtml = tpl;
                    //editorContend && editorContend.html(tpl);
                });
            }
        };
        //获取路线
        function init() {
            var route = Bag.getRegion("ROUTE");
            var car = Bag.getRegion("CAR");
            if (route.id == "") {
                layer.msg('请先选择路线', { icon: 1 }, function () {
                    location.href = "/wp_Index.htm";
                });
            }

            var opart = new jsonRow();
            opart.AddCell("routeid", route.id);
            opart.AddCell("routetype", route.name);
            opart.AddCell("carid", car.id);
            opart.AddCell("ACTION", "init");
            ajaxComm(opart);
        }

        //保存
        function sublit() {
            var route = Bag.getRegion("ROUTE");
            var car = Bag.getRegion("CAR");
            if (route.id == "") {
                layer.msg('请先选择路线', { icon: 1 }, function () {
                    location.href = "/wp_Index.htm";
                });
            }
            if (car.id == "") {
                layer.msg('请先在首页选择车辆', { icon: 1 }, function () {
                    location.href = "/wp_TravelCarList.htm";
                });
            }

            var opart = new jsonRow();
            opart.AddCell("routeid", route.id);
            opart.AddCell("routetype", route.name);
            opart.AddCell("carid", car.id);
            opart.AddCell("ACTION", "save");
            ajaxComm(opart);
        }
        function success(id) {
            layer.msg('订单已生成', { icon: 1 }, function () {
                location.href = "/wb_CommitDemand.htm?routeOrderId=" + id;
            });
        }

        //删除景点
        function deleteJd(detailID) {
            layer.confirm('您确定删除该景点？', { icon: 3 }, function (index) {
                var opart = new jsonRow();
                opart.AddCell("detailId", detailID);
                opart.AddCell("ACTION", "delInfo");
                ajaxComm(opart);

                layer.close(index);
                //加载层-风格4
                layer.msg('景点提交中', { icon: 16 });
            });
        }
        init();
    </script>
</body>
</html>
